/* ==================== 容器 ==================== */
.military-gantt-container {
  position: relative;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  margin: -20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #D4FFEF;
  font-family: 'Microsoft YaHei', sans-serif;
  font-size: 13px;
  user-select: none;
}

/* ==================== 顶部控制栏 ==================== */
.gantt-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  padding: 0 15px;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 30px;
}

.time-info {
  color: #D4FFEF;
  font-size: 16px;
}

.refresh-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  color: #D4FFEF;
  font-size: 18px;
  cursor: pointer;
}

.refresh-btn:hover {
  background: rgba(0, 255, 192, 0.1);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 40px;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 15px;
}

.select-box {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #D4FFEF;
  font-size: 16px;
}

.select-wrapper {
  position: relative;
  flex-shrink: 0;
}

.select-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 143px;
  padding: 4px 10px;
  border: 1px solid #D4FFEF;
  border-radius: 4px;
  text-align: center;
  user-select: none;
  cursor: pointer;
  box-sizing: border-box;
}

.arrow-icon {
  font-size: 16px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.arrow-icon.is-open {
  transform: rotate(-180deg);
}

.select-trigger:hover {
  border-color: #D4FFEF;
  color: #D4FFEF;
}

/* 下拉菜单 */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  width: 100%;
  max-height: 280px;
  margin-top: 4px;
  padding: 0;
  border: 1px solid rgba(212, 255, 239, 0.3);
  border-radius: 4px;
  background: linear-gradient(180deg, #002C29 0%, #011715 100%);
  overflow-y: auto;
  box-sizing: border-box;
}


.dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

.dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.dropdown-item {
  padding: 6px 0;
  text-align: center;
  color: #b3e0e0;
  cursor: pointer;
  transition: background 0.2s;
}

.dropdown-item:hover {
  background: rgba(0, 255, 192, 0.1);
  color: #fff;
}

.dropdown-item.active {
  background: rgba(6, 255, 176, 0.6);
  color: #fff;
  font-weight: bold;
}

.play-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 143px;
  height: 36px;
  border: none;
  border-radius: 4px;
  background: #06FFB0;
  color: #000;
  font-weight: bold;
  cursor: pointer;
  box-sizing: border-box;
}

.play-btn:hover {
  background: #ccfff2;
}

.btn-icon {
  font-size: 22px;
}


/* ==================== 主体布局 ==================== */
.gantt-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* 左侧树形面板 */
.left-tree-panel {
  display: flex;
  flex-direction: column;
  width: 300px;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.panel-header {
  height: 67px;
  padding-left: 15px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-right: none;
  background: rgba(0, 205, 154, 0.15);
  color: #D4FFEF;
  font-size: 16px;
  line-height: 67px;
}

.tree-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  margin-bottom: 8px;
}

.tree-content::-webkit-scrollbar {
  width: 0px;
}

.tree-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

.tree-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.tree-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.tree-row {
  position: relative;
  display: flex;
  align-items: center;
  height: 68px;
  border-bottom: 1px solid rgba(212, 255, 239, 0.3);
  cursor: default;
  transition: background 0.2s;
}

.tree-row:hover {
  background: rgba(0, 255, 192, 0.05);
}

.tree-row:hover .row-name {
  color: #06FFB0;
}

.expand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  margin-right: 10px;
  color: #D4FFEF;
  font-size: 16px;
  text-align: center;
  cursor: pointer;
}

.checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-right: 10px;
  border: 1px solid #D4FFEF;
  border-radius: 4px;
  cursor: pointer;
}

.checkbox.checked {
  background: #06FFB0;
  border-color: #06FFB0;
  box-shadow: none;
}

.check-icon {
  color: #000 !important;
  font-size: 12px;
  font-weight: bold;
}

.row-name {
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 左侧悬浮详情框 */
.row-detail-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  width: max-content;
  padding: 5px 8px;
  gap: 1px;
  border: 1px solid rgba(212, 255, 239, 0.3);
  border-radius: 4px;
  background: linear-gradient(180deg, #002C29 0%, #011715 100%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  box-sizing: border-box;
}

.detail-item {
  color: #D4FFEF;
  font-size: 12px;
}

.d-label {
  color: #D4FFEF;
}

/* 右侧图表面板 */
.right-chart-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.header-scroll-container {
  width: 100%;
  flex-shrink: 0;
  overflow: hidden;
}

.chart-scroll-container {
  flex: 1;
  overflow: auto;
  position: relative;
}

.chart-scroll-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
  /* 横向滚动条也需要 */
}

.chart-scroll-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

.chart-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.chart-scroll-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* ==================== 时间轴头部 ==================== */
.timeline-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 67px;
  background: rgba(0, 205, 154, 0.15);
}

.ruler-container {
  position: relative;
  width: 100%;
  height: 100%;
  border-bottom: 1px solid rgba(212, 255, 239, 0.5);
  overflow: hidden;
  box-sizing: border-box;
}

.ruler-tick {
  position: absolute;
  bottom: 0;
  width: 1px;
  background-color: rgba(212, 255, 239, 0.5);
}

.ruler-tick.major-tick {
  height: 10px;
  background-color: rgba(212, 255, 239, 0.9);
}

.ruler-tick.minor-tick {
  height: 6px;
  background-color: #D4FFEF;
}

.tick-label {
  position: absolute;
  bottom: 12px;
  left: 0;
  transform: translateX(-50%);
  color: #D4FFEF;
  font-size: 12px;
}

/* K时刻头部徽章 */
.k-header-badge {
  position: absolute;
  bottom: 15px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.kh-title {
  margin-bottom: -4px;
  color: #D4FFEF;
  font-size: 12px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.kh-value {
  color: #fff;
  font-size: 20px;
  font-weight: bold;
}

/* K时刻贯穿线 */
.k-time-line {
  position: absolute;
  top: 0;
  z-index: 15;
  width: 2px;
  background: rgba(212, 255, 239, 0.3);
}

.k-line-label {
  display: none;
}

/* ==================== 任务渲染层 ==================== */
.task-layers {
  position: relative;
}

.task-row-layer {
  position: absolute;
  left: 0;
  right: 0;
  border-bottom: 1px solid rgba(212, 255, 239, 0.3);
}

/* 连线样式 */
.timeline-segment {
  position: absolute;
  top: 50%;
  height: 1.8px;
  transform: translateY(-0.5px);
}

.segment-gradient {
  height: 1.8px;
  background: linear-gradient(to right, #FF9900, #00FF7B);
}

.segment-solid {
  height:10px;
  background: url('@/assets/GanttChart/icon-line-segment.png') no-repeat center center;
  background-size: 92% 100%;
  transform: translateY(-3px);
  box-shadow: none;
}

.segment-dashed {
  height: 1.8px;
  background: linear-gradient(to right, #00FF7B, #FF9900);
}

/* 航点图标 */
.waypoint-node {
  position: absolute;
  top: 50%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.wp-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.icon-plane {
  font-size: 20px;
}

.icon-target {
  color: #ff3333;
  font-size: 18px;
}

.icon-hidden .wp-icon {
  width: 14px;
  height: 14px;
  background: transparent;
}

.trigger-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 5px #fff;
  opacity: 0.6;
}

.waypoint-node:hover .trigger-dot {
  opacity: 1;
}

.wp-label {
  position: absolute;
  top: 24px;
  color: #D4FFEF;
  font-size: 12px;
  white-space: nowrap;
}


/* ==================== 悬浮提示框 ==================== */
.hb-row {
  margin-bottom: 2px;
}

.chart-point-tooltip {
  position: fixed;
  z-index: 9999;
  padding: 6px 10px;
  border: 1px solid rgba(212, 255, 239, 0.3);
  border-radius: 4px;
  background: linear-gradient(180deg, #002C29 0%, #011715 100%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  color: #D4FFEF;
  font-size: 12px;
  white-space: nowrap;
  transform: translate(-50%, -100%);
  pointer-events: none;
  box-sizing: border-box;
}

.chart-point-tooltip .hb-arrow {
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 6px;
  height: 6px;
  border-right: 1px solid rgba(212, 255, 239, 0.3);
  border-bottom: 1px solid rgba(212, 255, 239, 0.3);
  background: #011715;
  transform: translateX(-50%) rotate(45deg);
}

.custom-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}
.point-icon {
  width: 13px;
  height: 13px;
  object-fit: contain;
  display: block;
  transform: translateY(-76%);
  position: relative;
  z-index: 20;
}